package com.example.api.client;

import com.example.api.client.fallback.OrderFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "order", url = "http://127.0.0.1:18083", fallbackFactory = OrderFallback.class)
public interface OrderClient {
    /**
     * 创建订单
     */
    @PostMapping(path = "/order")
    String create(@RequestParam("userId") String userId,
                 @RequestParam("commodityCode") String commodityCode,
                 @RequestParam("orderCount") int orderCount);
}
